@layout("/common/_container.html"){
<!--startprint1-->
<style>
    #login>h1{letter-spacing:20px;color: #666666;display: inline-block;margin-bottom: 20px;}
    #login>h2{letter-spacing:20px;margin-bottom: 15px;}
    #programmeBox{display: flex;flex-direction:column;border: 1px solid #666666}
    #programmeBox>div{border-bottom: 1px solid #666666;height: 150px;padding: 5px;}
    #inputBox{display: flex;margin-bottom: 15px;text-align: center}  #inputBox>div{flex: 1;}
    input{border: none;border-bottom: 1px solid #999999;outline:none;width: 60%;padding-left: 10px;}
    .sign>span{display: inline-block;width: 20%}
    .toothNone{border:  none;outline:  none;background: none;display: inline-block;width: 50%;height: 14px;}
    .leftUp{border-right: 1px solid #666666;border-bottom: 1px solid #666666;text-align: right;padding-right: 4px;position: absolute}
    .rightUp{border-bottom: 1px solid #666666;padding-left: 4px;margin-left: -10px;position: absolute;right: 0;}
    .leftDown{border-right: 1px solid #666666;text-align: right;padding-right: 4px;position: absolute;bottom: 0;}
    .rightDown{padding-left: 4px;margin-left: -10px;position: absolute;bottom: 0;right: 0;}
</style>

<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div>
            <div id="login" style="text-align: center">
                <h1>湖北咿呀连锁品牌</h1>
                <h2>费用确认单</h2>
            </div>
            <div id="inputBox">
                <div>
                    <span>接诊医生：</span>
                    @if(payService.fieldTc == "孙玉凤"){
                    <input type="text" readonly="readonly" value="孙玉">
                    @}
                    @if(payService.fieldTc != "孙玉凤"){
                    <input type="text" readonly="readonly" value="${payService.fieldTc}">
                    @}
                </div>
                <div>
                    <span>就诊医生：</span>
                    <input type="text" readonly="readonly" value="${payService.doctor}">
                </div>
                <div>
                    <span>就诊日期：</span>
                    <input type="text" readonly="readonly" value="${payService.operationTime}">
                </div>
                <div>
                    <span>姓名：</span>
                    <input type="text" readonly="readonly" value="${payService.customerName}">
                </div>
            </div>
            <div id="programmeBox">
                <div style="height: 310px;">
                    <span>方案一：</span>
                    @for(item in payServiceInfo){
                    <div style="display: flex;height: 28px;line-height: 28px;">
                        <div style="flex: 1.5;position: relative">
                            <input readonly="readonly" class="toothNone leftUp" type="text" value="${item.leftUp}">
                            <input readonly="readonly" class="toothNone rightUp" type="text" value="${item.rightUp}">
                            <input readonly="readonly" class="toothNone leftDown" type="text" value="${item.leftDown}">
                            <input readonly="readonly" class="toothNone rightDown" type="text" value="${item.rightDown}">
                        </div>
                        <div style="flex: 3;text-indent: 1em;">
                            <span>项目：${item.payServiceName}</span>
                        </div>
                        <div style="flex: 0.8;">
                            <span>${item.payService}/${item.unit}</span>
                        </div>
                        <div style="flex: 0.5">
                            <span>${item.payServiceNum}${item.unit}</span>
                        </div>
                        <div style="flex: 1;">
                            <span>金额：${item.foldingPay}</span>
                        </div>
                    </div>
                    @}
                </div>
                <div>
                    <span>方案二：</span>
                </div>
                <div>
                    <span>方案三：</span>
                </div>
                <div>
                    <span>备注：</span>
                    <div>${payService.remarks}</div>
                </div>
            </div>
            <div style="text-align: center">
                <p style="margin: 20px;">以上方案，我同意按照第<input type="text" style="width: 15%">个方案。总计金额为：<input type="text" value="${payService.totleFoldingPay}" style="width: 15%">元</p>
                <p class="sign"><span style="width: 35%">本人确认签字：</span><span>家长确认签字：</span><span>日期：</span></p>
            </div>
        </div>
    </div>
</div>
<!--endprint1-->

<div style="background: white;padding: 20px;position: absolute;top: 0;right: 2%" class="clearfix">
    <div style="text-align: center">
        <input id="preview" type="hidden" style="color: white;background:#30add1;width: 97px;height: 44px;" class="btn" name='button_export' title='打印1' onclick="preview(1)" value="点击打印">
    </div>
</div>

<script language="javascript">

    $(function () {
        $("#preview").click()
    });

    function preview(oper) {
        if (oper < 10){
            bdhtml=window.document.body.innerHTML;//获取当前页的html代码
            sprnstr="<!--startprint"+oper+"-->";//设置打印开始区域
            eprnstr="<!--endprint"+oper+"-->";//设置打印结束区域
            prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+18); //从开始代码向后取html
            prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));//从结束代码向前取html
            window.document.body.innerHTML=prnhtml;
            window.print();
            window.document.body.innerHTML=bdhtml;
        } else {
            window.print();
        }
        $('#cancel', parent.document).click();
    }
</script>
@}
